//
//  WuLiuProgressTableViewCell.m
//  HuaLang
//
//  Created by iking on 2018/3/9.
//  Copyright © 2018年 iking. All rights reserved.
//

#import "WuLiuProgressTableViewCell.h"

@implementation WuLiuProgressTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    //    self.label1 = [UILabel labelWithText:@"运输中" textColor:UIColorWithRGB(3, 11, 25) fontSize:15];
    //    [_label1 sizeToFit];
    //    [self addSubview:_label1];
    //    [_label1 mas_makeConstraints:^(MASConstraintMaker *make) {
    //        make.top.equalTo(self).offset(rateHeight(35));
    //        make.left.equalTo(self).offset(rateWidth(100));
    //    }];
    self.label2 = [UILabel labelWithText:@"" textColor:UIColorWithRGB(3, 11, 25) fontSize:15];
    _label2.numberOfLines = 0;
    [_label2 sizeToFit];
    [self addSubview:_label2];
    [_label2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(rateHeight(35));
        make.left.equalTo(self).offset(rateWidth(100));
        make.width.mas_lessThanOrEqualTo(@(rateWidth(600)));
    }];
    
    //    self.img1 = [[UIImageView alloc] init];
    //    _img1.backgroundColor = UIColorWithRGB(78, 154, 167);
    //    [self addSubview:_img1];
    //    [_img1 mas_makeConstraints:^(MASConstraintMaker *make) {
    //        make.size.mas_offset(CGSizeMake(rateWidth(190), rateWidth(190)));
    //        make.top.equalTo(_label2.mas_bottom).offset(rateHeight(40));
    //        make.left.equalTo(self).offset(rateWidth(95)+(rateWidth(190)+rateWidth(20))*0);
    //    }];
    //    self.img2 = [[UIImageView alloc] init];
    //    _img2.backgroundColor = UIColorWithRGB(78, 154, 167);
    //    [self addSubview:_img2];
    //    [_img2 mas_makeConstraints:^(MASConstraintMaker *make) {
    //        make.size.mas_offset(CGSizeMake(rateWidth(190), rateWidth(190)));
    //        make.top.equalTo(_label2.mas_bottom).offset(rateHeight(40));
    //        make.left.equalTo(self).offset(rateWidth(95)+(rateWidth(190)+rateWidth(20))*1);
    //    }];
    //    self.img3 = [[UIImageView alloc] init];
    //    _img3.backgroundColor = UIColorWithRGB(78, 154, 167);
    //    [self addSubview:_img3];
    //    [_img3 mas_makeConstraints:^(MASConstraintMaker *make) {
    //        make.size.mas_offset(CGSizeMake(rateWidth(190), rateWidth(190)));
    //        make.top.equalTo(_label2.mas_bottom).offset(rateHeight(40));
    //        make.left.equalTo(self).offset(rateWidth(95)+(rateWidth(190)+rateWidth(20))*2);
    //    }];
    
    self.timeLB = [UILabel labelWithText:@"2017-03-02   10:12:12" textColor:UIColorWithRGB(102, 102, 102) fontSize:13];
    [_timeLB sizeToFit];
    [self addSubview:_timeLB];
    [_timeLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self).offset(-rateHeight(20));
        make.left.equalTo(self.label2);
    }];
    
    self.pointImg = [[UIImageView alloc] init];
    _pointImg.image = UIImageNamed(@"jianli_point_grey");
    [_pointImg sizeToFit];
    [self addSubview:_pointImg];
    [_pointImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.label2);
        make.centerX.equalTo(self.mas_left).offset(rateWidth(40));
    }];
    
    self.line0 = [[UIView alloc] init];
    _line0.backgroundColor = lineGray;
    [self addSubview:_line0];
    [_line0 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.pointImg);
        make.bottom.equalTo(self.pointImg.mas_top);
        make.width.equalTo(@(0.5));
        make.top.equalTo(self);
    }];
    
    self.line = [[UIView alloc] init];
    _line.backgroundColor = lineGray;
    [self addSubview:_line];
    [_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.pointImg);
        make.top.equalTo(self.pointImg.mas_bottom);
        make.width.equalTo(@(0.5));
        make.bottom.equalTo(self);
    }];
    
}
@end
